package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
public class Department extends BaseDomain{
    private String name;
    private String sn;

    //返回页面需要数据的json字符串
    public String getJsonString(){
        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("sn",sn);
        //转换成json字符串
        return JSON.toJSONString(map);
    }
}
